Field of the Invention
Embodiments disclosed herein relate to a switch for a computer network, and specifically the dynamic allocation of buffer memory within the switch in response to different types of data transmission requirements over the network. Embodiments also relate to a network device configured to communicate with the switch over the network.
Description of the Related Technology
Computer networks allow networked computing devices to exchange data with each other along communication channels (data connections) established using either physical cable media, or wireless media. A network socket is the endpoint of such a two-way communication channel on a computer network.
A switch connects network devices together, electrically and logically, by using data packet switching to receive, process and forward data over a computer network to the intended network device(s). Alternative, older devices, such as network hubs, connected multiple network device together over a computer network by broadcasting the same data to each network socket, and each connected network device. In contrast, a switch forwards data only to a specific network device (or specific multiple network devices). Each network device connected to a switch can be identified using a Media Access Control (MAC) address, a unique identifier allowing the switch to regulate and direct the flow of network traffic, improving the security and efficiency of the network.
When transferring data over a network, each device (including the switch) typically allocates a portion of memory to be used as a temporary “holding pen” for data that is being sent or received, enabling each device to manipulate and prepare the data before sending it on, or saving it. This temporary storage is known as a “buffer”, and it ensures that any sent or received data has somewhere to go, i.e., into the buffer temporarily, until its ultimate destination becomes decided and available.
Different computer systems, networks and connection types employ different communication protocols to send and receive data. The most common network for data transmission is the Internet, which uses the Transmission Control Protocol (TCP) as the core protocol of the Internet protocol suite (IP). TCP is a “reliable” protocol which provides acknowledgement of successful delivery of data to the intended recipient(s). Using TCP involves both a “send buffer” and a “receive buffer”, for sending and receiving data respectively, and the size of each buffer may be adjusted independently of each other. The send buffer determines how much data to be sent can be temporarily held before receiving acknowledgement that the data has been received, and the receive buffer determines how much data, that have been received and not passed to an upper layer, can be temporarily held before further data can be received at the socket. Furthermore, the TCP “send window” parameter determines the amount of unacknowledged data that can be “in flight” between the sending and receiving sockets of a communication channel, at any given time.
To avoid network traffic congestion, TCP employs a congestion-avoidance algorithm, and each of the parameters (send buffer, receive buffer, send window) can be “tuned” independently to improve traffic throughput. For maximum throughput in a communication channel, the smaller of either the send buffer or the receive buffer is adjusted to be sufficiently large so that any data transfer can saturate the underlying communication channel. A fundamental concept in a window-controlled transport protocol (such as TCP) is the “Bandwidth Delay Product” (BDP), which represents the maximum possible amount of data held on the network circuit at any given time, i.e., data that has been sent but not yet acknowledged. If the bandwidth (bits per second) of the communication channel is C, and the round-trip time (in seconds) is T, the maximum possible throughput (in bits) is achieved when the send window is equal to the BDP, where BDP=C×T. In order to saturate the communication channel, the smaller of either the send or the receive buffer should be equally as large as the BDP. If the size of the smaller socket buffer is less than the receive window, the communication channel will underutilize the path. If the smaller of the send and receive socket buffers is larger than the receive window, the communication channel will overload the path, and depending on the amount of buffering, the transfer may cause buffer overflows, receive window reductions, and throughput drops.
Known methods of TCP tuning are described in “Socket Buffer Auto-Sizing for High-Performance Data Transfers” by Ravi S. Prasad et al, which discloses a congestion control method (“SOcket Buffer Auto Sizing”—SOBAS) incorporating an application-layer mechanism that automatically determines the send and receive buffer sizes in order to saturate the available bandwidth in a communication channel while a data transfer is in progress. This is achieved in non-congested paths by limiting the receive buffer size, and therefore by association the maximum possible send window (since the size of the send window is limited by the receive buffer size), so that any data transfer saturates the channel but does not cause a buffer overflow. In congested paths, on the other hand, SOBAS increases the buffer size to maximum, so that the transfer is congestion limited.
The prior art also discloses methods of dynamic buffer allocation in a communication channel. Embodiments disclosed herein provide a novel, pre-emptive solution allowing data to be transferred over potentially redundant existing communication channels, without initiating a new channel, and thereby reducing overheads.